import Vue from 'vue'
import Router from 'vue-router'
//app主框架页
import index from '../view/index/index'
//app内嵌页==>电影
import movie from '../view/index/movie/movie'
//app内嵌页==>用户
import user from '../view/index/user/user'
//app内嵌页==>特惠
import discounts from '../view/index/discounts/discounts'
//app内嵌页==>影院
import cinema from '../view/index/cinema/cinema'
//登录
import login from '../view/others/login/login'
//注册
import register from '../view/others/register/register'
//关于我们
import about from '../view/others/about/about'
//设置
import setting from '../view/others/setting/setting'
//修改密码
import changePassword from '../view/others/changePassword/changePassword'
//意见反馈
import feedback from '../view/others/feedback/feedback'
//我的已看
import saw from '../view/others/saw/saw'
//我的卡券
import myCoupons from '../view/others/myCoupons/myCoupons'
//新增卡券
import addCoupons from '../view/others/addCoupons/addCoupons'
//我的想看
import wantToSee from '../view/others/wantToSee/wantToSee'
//我的电影票
import movieTicket from '../view/others/movieTicket/movieTicket'
//取票
import takeTicket from '../view/others/takeTicket/tackTicket'
//影院收藏
import cinemaCollect from '../view/others/cinemaCollect/cinemaCollect'
//消息
import message from '../view/others/message/message'
//搜索
import search from '../view/others/search/search'
//城市选择
import chooseCity from '../view/others/chooseCity/chooseCity'
//全部电影
import allMovie from '../view/others/allMovie/allMovie'
//正在热映
import onlineMovie from '../view/others/allMovie/onlineMovie/onlineMovie'
//即将上线
import notOnlineMovie from '../view/others/allMovie/notOnlineMovie/notOnlineMovie'
//电影详情
import onlineMovieDetails from '../view/others/onlineMovieDetails/onlineMovieDetails'
//选择场次
import chooseSession from '../view/others/chooseSession/chooseSession'
//评论
import rating from '../view/others/rating/rating'
//影院详情
import cinemaInfo from '../view/others/cinemaInfo/cinemaInfo'
//选择影院
import chooseCinema from '../view/others/chooseCinema/chooseCinema'
//选座
import chooseSeat from '../view/others/chooseSeat/chooseSeat'
//404
import notFoundPage from '../view/others/404/404'
//活动内嵌页盒子
import iframeBox from '../view/others/iframeWrapper/iframeWrapper'
//选择优惠
import choosePreferential from '../view/others/choosePreferential/choosePreferential'
//影院定位
import location from '../view/others/location/location'
//支付
import pay from '../view/others/pay/pay'
//修改用户名
import modifyUserName from '../view/others/modifyUserName/modifyUserName'
//热点
import news from '../view/others/news/news'
//我的会员卡
import membershipCard from '../view/others/membershipCard/membershipCard'
//绑定会员卡
import addCard from '../view/others/addCard/addCard'
//测试页
import test from '../view/others/test/test'
//所有评论
import allRatings from '../view/others/allRatings/allRatings'
//付款状态
import payStatus from '../view/others/payStatus/payStatus'
Vue.use(Router)

export default new Router({
  linkActiveClass: 'active',//全局设置router选中状态类名为active
  routes: [
    {
      path: '/',
      // component: index
      redirect:'/index/movie'
    },
    {
      path:'/payStatus',
      name:'payStatus',
      component:payStatus
    },
    {
      path:'/allRatings',
      name:'allRatings',
      component:allRatings
    },
    {
      path:'/addCard',
      name:'addCard',
      component:addCard
    },
    {
      path:'/news',
      name:'news',
      component:news
    },
    {
      path:'/membershipCard',
      name:'membershipCard',
      component:membershipCard
    },
    {
      path:'/modifyUserName',
      name:'modifyUserName',
      component:modifyUserName
    },
    {
      path:'/pay',
      name:'pay',
      component:pay
    },
    {
      path:'/choosePreferential',
      name:'choosePreferential',
      component:choosePreferential
    },
    {
      path:'/location',
      name:'location',
      component:location
    },
    {
      path:'/iframeBox',
      name:'iframeBox',
      component:iframeBox
    },
    {
      path:'*',
      name:'notFoundPage',
      component:notFoundPage
    },
    {
      path:'/chooseSeat',
      name:'chooseSeat',
      component:chooseSeat
    },
    {
      path:'/chooseCinema',
      name:'chooseCinema',
      component:chooseCinema
    },
    {
      path:'/test',
      name:'test',
      component:test
    },
    {
      path:'/cinemaInfo',
      name:'cinemaInfo',
      component:cinemaInfo
    },
    {
      path:'/chooseSession',
      name:'chooseSession',
      component:chooseSession
    },
    {
      path:'/rating',
      name:'rating',
      component:rating
    },
    {
      path:'/onlineMovieDetails',
      name:'onlineMovieDetails',
      component:onlineMovieDetails
    },
    {
      path:'/allMovie',
      component:allMovie,
      children: [
        {
          path:'/',
          redirect:'onlineMovie',
        },
        {
          path:'onlineMovie',
          name:'onlineMovie',
          component:onlineMovie
        },
        {
          path:'notOnlineMovie',
          name:'notOnlineMovie',
          component:notOnlineMovie
        }
      ]
    },
    {
      path:'/chooseCity',
      name:'chooseCity',
      component:chooseCity
    },
    {
      path:'/search',
      name:'search',
      component:search
    },
    {
      path:'/message',
      name:'message',
      component:message
    },
    {
      path:'/cinemaCollect',
      name:'cinemaCollect',
      component:cinemaCollect
    },
    {
      path:'/takeTicket',
      name:'takeTicket',
      component:takeTicket
    },
    {
      path:'/myCoupons',
      name:'myCoupons',
      component:myCoupons
    },
    {
      path:'/movieTicket',
      name:'movieTicket',
      component:movieTicket
    },
    {
      path:'/wantToSee',
      name:'wantToSee',
      component:wantToSee
    },
    {
      path:'/addCoupons',
      name:'addCoupons',
      component:addCoupons
    },
    {
      path:'/about',
      name:'about',
      component:about
    },
    {
      path:'/saw',
      name:'saw',
      component:saw
    },
    {
      path:'/feedback',
      name:'feedback',
      component:feedback
    },
    {
      path:'/changePassword',
      name:'changePassword',
      component:changePassword
    },
    {
      path:'/setting',
      name:'setting',
      component:setting
    },
    {
      path:'/login',
      name:'login',
      component:login
    },
    {
      path:'/register',
      name:'register',
      component:register
    },
    {
      path: '/index',
      name:'index',
      component: index,
      children:[
        {
          path:'movie',
          name:'movie',
          component:movie
        },
        {
          path:'user',
          name:'user',
          component:user,
        },
        {
          path:'discounts',
          name:'discounts',
          component:discounts
        },
        {
          path:'cinema',
          name:'cinema',
          component:cinema
        }
      ]
    }
  ]
})
